package cn.edu.sasu.webservice.impl;

import java.util.Map;

import cn.edu.sasu.domain.Users;
import cn.edu.sasu.http.HttpNewsService;
import cn.edu.sasu.http.HttpUrl;
import cn.edu.sasu.http.HttpUserService;
import cn.edu.sasu.webservice.LoginService;

public class LoginServiceImpl implements LoginService {

	private HttpNewsService newsService = null;
	private HttpUserService userService = null;

	public LoginServiceImpl() {
		newsService = new HttpNewsService();
		userService = new HttpUserService();
	}

	@Override
	public String login(Map<String, String> parmes) {
		return newsService.requestByPost(HttpUrl.url(HttpUrl.USER_LOGIN),
				parmes);
	}

	@Override
	public Users parseUser(String data) {
		return userService.parserUser(data);
	}
}
